home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 …SCII & the Runetime Code / ADC Developer CD (1992-07) (''Butch ASCII And The Runtime Code'')_iso / Dev.CD 199207.iso / Developer Essentials / MPW Interfaces & Libraries / CIncludes / Quickdraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-29  |  29.0 KB  |  1,066 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4. Created: Tuesday, December 3, 1991 at 4:53 PM
  5.  Quickdraw.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.   Copyright Apple Computer, Inc. 1985-1991
  10.   All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __QUICKDRAW__
  16. #define __QUICKDRAW__
  17.  
  18. #ifndef __TYPES__
  19. #include <Types.h>
  20. #endif
  21.  
  22.  
  23. enum {
  24.  
  25.  invalColReq = -1,                    /*invalid color table request*/
  26.  
  27. /* transfer modes */
  28.  srcCopy = 0,                        /*the 16 transfer modes*/
  29.  srcOr = 1,
  30.  srcXor = 2,
  31.  srcBic = 3,
  32.  notSrcCopy = 4,
  33.  notSrcOr = 5,
  34.  notSrcXor = 6,
  35.  notSrcBic = 7,
  36.  patCopy = 8,
  37.  patOr = 9,
  38.  patXor = 10,
  39.  patBic = 11,
  40.  notPatCopy = 12,
  41.  notPatOr = 13,
  42.  notPatXor = 14,
  43.  notPatBic = 15,
  44.  
  45. /* Special Text Transfer Mode */
  46.  grayishTextOr = 49,
  47.  
  48. /* Arithmetic transfer modes */
  49.  blend = 32,
  50.  addPin = 33
  51. };
  52. enum {
  53.  addOver = 34,
  54.  subPin = 35,
  55.  addMax = 37,
  56.  adMax = 37,
  57.  subOver = 38,
  58.  adMin = 39,
  59.  ditherCopy = 64,
  60.  
  61. /* Transparent mode constant */
  62.  transparent = 36,
  63.  
  64. /* QuickDraw color separation constants */
  65.  normalBit = 0,                        /*normal screen mapping*/
  66.  inverseBit = 1,                    /*inverse screen mapping*/
  67.  redBit = 4,                        /*RGB additive mapping*/
  68.  greenBit = 3,
  69.  blueBit = 2,
  70.  cyanBit = 8,                        /*CMYBk subtractive mapping*/
  71.  magentaBit = 7,
  72.  yellowBit = 6,
  73.  blackBit = 5,
  74.  blackColor = 33,                    /*colors expressed in these mappings*/
  75.  whiteColor = 30,
  76.  redColor = 205
  77. };
  78. enum {
  79.  greenColor = 341,
  80.  blueColor = 409,
  81.  cyanColor = 273,
  82.  magentaColor = 137,
  83.  yellowColor = 69,
  84.  
  85.  picLParen = 0,                        /*standard picture comments*/
  86.  picRParen = 1,
  87.  
  88.  normal = 0,
  89.  bold = 1,
  90.  italic = 2,
  91.  underline = 4,
  92.  outline = 8,
  93.  shadow = 0x10,
  94.  condense = 0x20,
  95.  extend = 0x40,
  96.  
  97.  clutType = 0,                        /*0 if lookup table*/
  98.  fixedType = 1,                        /*1 if fixed table*/
  99.  directType = 2,                    /*2 if direct values*/
  100.  
  101.  gdDevType = 0,                        /*0 = monochrome 1 = color*/
  102.  burstDevice = 7
  103. };
  104. enum {
  105.  ext32Device = 8,
  106.  ramInit = 10,                        /*1 if initialized from 'scrn' resource*/
  107.  mainScreen = 11,                    /* 1 if main screen */
  108.  allInit = 12,                        /* 1 if all devices initialized */
  109.  screenDevice = 13,                    /*1 if screen device [not used]*/
  110.  noDriver = 14,                        /* 1 if no driver for this GDevice */
  111.  screenActive = 15,                    /*1 if in use*/
  112.  
  113.  hiliteBit = 7,                        /*flag bit in HiliteMode (lowMem flag)*/
  114.  pHiliteBit = 0,                    /*flag bit in HiliteMode used with BitClr procedure*/
  115.  
  116.  defQDColors = 127,                    /*resource ID of clut for default QDColors*/
  117.  
  118. /* pixel type */
  119.  RGBDirect = 16,                    /* 16 & 32 bits/pixel pixelType value */
  120.  
  121. /* pmVersion values */
  122.  baseAddr32 = 4,                    /*pixmap base address is 32-bit address*/
  123.  
  124.  rgnOverflowErr = -147,                /* Region accumulation failed. Resulting region may be currupt */
  125.  insufficientStackErr = -149        /* QuickDraw could not complete the operation */
  126. };
  127.  
  128. enum {frame,paint,erase,invert,fill};
  129. typedef unsigned char GrafVerb;
  130.  
  131. enum {chunky,chunkyPlanar,planar};
  132. typedef unsigned char PixelType;
  133.  
  134.  
  135. typedef short Bits16[16];
  136.  
  137. /***************   IMPORTANT NOTE REGARDING PATTERN  **************************************
  138.    The old array defintion of Pattern would cause 68000 based CPU's to crash in certain circum-
  139.    stances. The new struct definition is safe, but may require source code changes to compile.
  140.    Read the details in Appendix J of:
  141.            "MPW E.T.O. #6 Latest Libraries/Interfaces"
  142.     If you decide that you are safe, and happier with the old definition, you may add
  143.    "-d dangerousPattern" to your C command line to avoid compilation errors without changing
  144.    your source code.
  145. *********************************************************************************************/
  146. #ifdef dangerousPattern
  147. typedef unsigned char Pattern[8];
  148. typedef Pattern *PatPtr;
  149. typedef const unsigned char *ConstPatternParam;
  150. #else
  151. struct Pattern{
  152.    unsigned char pat[8];
  153. };
  154. typedef struct Pattern Pattern;
  155. typedef Pattern *PatPtr;
  156. typedef const Pattern *ConstPatternParam;
  157. #endif
  158. typedef PatPtr *PatHandle;
  159.  
  160. typedef char QDByte, *QDPtr, **QDHandle;
  161.  
  162. typedef short QDErr;
  163.  
  164. enum {singleDevicesBit = 0,dontMatchSeedsBit = 1,allDevicesBit = 2};
  165.  
  166. enum {singleDevices = 1 << singleDevicesBit,dontMatchSeeds = 1 << dontMatchSeedsBit,
  167.  allDevices = 1 << allDevicesBit};
  168. typedef unsigned long DeviceLoopFlags;
  169.  
  170.  
  171. struct FontInfo {
  172.  short ascent;
  173.  short descent;
  174.  short widMax;
  175.  short leading;
  176. };
  177.  
  178. typedef struct FontInfo FontInfo;
  179.  
  180. struct BitMap {
  181.  Ptr baseAddr;
  182.  short rowBytes;
  183.  Rect bounds;
  184. };
  185.  
  186. typedef struct BitMap BitMap;
  187. typedef BitMap *BitMapPtr, **BitMapHandle;
  188.  
  189. struct Cursor {
  190.  Bits16 data;
  191.  Bits16 mask;
  192.  Point hotSpot;
  193. };
  194.  
  195. typedef struct Cursor Cursor;
  196. typedef Cursor *CursPtr, **CursHandle;
  197.  
  198. struct PenState {
  199.  Point pnLoc;
  200.  Point pnSize;
  201.  short pnMode;
  202.  Pattern pnPat;
  203. };
  204.  
  205. typedef struct PenState PenState;
  206.  
  207. struct Region {
  208.  short rgnSize;                        /*size in bytes*/
  209.  Rect rgnBBox;                        /*enclosing rectangle*/
  210. };
  211.  
  212. typedef struct Region Region;
  213. typedef Region *RgnPtr, **RgnHandle;
  214.  
  215. struct Picture {
  216.  short picSize;
  217.  Rect picFrame;
  218. };
  219.  
  220. typedef struct Picture Picture;
  221. typedef Picture *PicPtr, **PicHandle;
  222.  
  223. struct Polygon {
  224.  short polySize;
  225.  Rect polyBBox;
  226.  Point polyPoints[1];
  227. };
  228.  
  229. typedef struct Polygon Polygon;
  230. typedef Polygon *PolyPtr, **PolyHandle;
  231.  
  232. struct QDProcs {
  233.  Ptr textProc;
  234.  Ptr lineProc;
  235.  Ptr rectProc;
  236.  Ptr rRectProc;
  237.  Ptr ovalProc;
  238.  Ptr arcProc;
  239.  Ptr polyProc;
  240.  Ptr rgnProc;
  241.  Ptr bitsProc;
  242.  Ptr commentProc;
  243.  Ptr txMeasProc;
  244.  Ptr getPicProc;
  245.  Ptr putPicProc;
  246. };
  247.  
  248. typedef struct QDProcs QDProcs;
  249. typedef QDProcs *QDProcsPtr;
  250.  
  251. struct GrafPort {
  252.  short device;
  253.  BitMap portBits;
  254.  Rect portRect;
  255.  RgnHandle visRgn;
  256.  RgnHandle clipRgn;
  257.  Pattern bkPat;
  258.  Pattern fillPat;
  259.  Point pnLoc;
  260.  Point pnSize;
  261.  short pnMode;
  262.  Pattern pnPat;
  263.  short pnVis;
  264.  short txFont;
  265.  Style txFace;                        /*txFace is unpacked byte but push as short*/
  266.  char filler;
  267.  short txMode;
  268.  short txSize;
  269.  Fixed spExtra;
  270.  long fgColor;
  271.  long bkColor;
  272.  short colrBit;
  273.  short patStretch;
  274.  Handle picSave;
  275.  Handle rgnSave;
  276.  Handle polySave;
  277.  QDProcsPtr grafProcs;
  278. };
  279.  
  280. typedef struct GrafPort GrafPort;
  281. typedef GrafPort *GrafPtr;
  282.  
  283.  
  284. typedef GrafPtr WindowPtr;
  285.  
  286. struct RGBColor {
  287.  unsigned short red;                /*magnitude of red component*/
  288.  unsigned short green;                /*magnitude of green component*/
  289.  unsigned short blue;                /*magnitude of blue component*/
  290. };
  291.  
  292. typedef struct RGBColor RGBColor;
  293.  
  294.  
  295. typedef pascal Boolean (*ColorSearchProcPtr)(RGBColor *rgb, long *position);
  296. typedef pascal Boolean (*ColorComplementProcPtr)(RGBColor *rgb);
  297.  
  298. struct ColorSpec {
  299.  short value;                        /*index or other value*/
  300.  RGBColor rgb;                        /*true color*/
  301. };
  302.  
  303. typedef struct ColorSpec ColorSpec;
  304. typedef ColorSpec *ColorSpecPtr;
  305.  
  306.  
  307. typedef ColorSpec CSpecArray[1];
  308.  
  309. struct ColorTable {
  310.  long ctSeed;                        /*unique identifier for table*/
  311.  short ctFlags;                        /*high bit: 0 = PixMap; 1 = device*/
  312.  short ctSize;                        /*number of entries in CTTable*/
  313.  CSpecArray ctTable;                /*array [0..0] of ColorSpec*/
  314. };
  315.  
  316. typedef struct ColorTable ColorTable;
  317. typedef ColorTable *CTabPtr, **CTabHandle;
  318.  
  319. struct MatchRec {
  320.  unsigned short red;
  321.  unsigned short green;
  322.  unsigned short blue;
  323.  long matchData;
  324. };
  325.  
  326. typedef struct MatchRec MatchRec;
  327.  
  328. struct PixMap {
  329.  Ptr baseAddr;                        /*pointer to pixels*/
  330.  short rowBytes;                    /*offset to next line*/
  331.  Rect bounds;                        /*encloses bitmap*/
  332.  short pmVersion;                    /*pixMap version number*/
  333.  short packType;                    /*defines packing format*/
  334.  long packSize;                        /*length of pixel data*/
  335.  Fixed hRes;                        /*horiz. resolution (ppi)*/
  336.  Fixed vRes;                        /*vert. resolution (ppi)*/
  337.  short pixelType;                    /*defines pixel type*/
  338.  short pixelSize;                    /*# bits in pixel*/
  339.  short cmpCount;                    /*# components in pixel*/
  340.  short cmpSize;                        /*# bits per component*/
  341.  long planeBytes;                    /*offset to next plane*/
  342.  CTabHandle pmTable;                /*color map for this pixMap*/
  343.  long pmReserved;                    /*for future use. MUST BE 0*/
  344. };
  345.  
  346. typedef struct PixMap PixMap;
  347. typedef PixMap *PixMapPtr, **PixMapHandle;
  348.  
  349. struct PixPat {
  350.  short patType;                        /*type of pattern*/
  351.  PixMapHandle patMap;                /*the pattern's pixMap*/
  352.  Handle patData;                    /*pixmap's data*/
  353.  Handle patXData;                    /*expanded Pattern data*/
  354.  short patXValid;                    /*flags whether expanded Pattern valid*/
  355.  Handle patXMap;                    /*Handle to expanded Pattern data*/
  356.  Pattern pat1Data;                    /*old-Style pattern/RGB color*/
  357. };
  358.  
  359. typedef struct PixPat PixPat;
  360. typedef PixPat *PixPatPtr, **PixPatHandle;
  361.  
  362. struct CCrsr {
  363.  short crsrType;                    /*type of cursor*/
  364.  PixMapHandle crsrMap;                /*the cursor's pixmap*/
  365.  Handle crsrData;                    /*cursor's data*/
  366.  Handle crsrXData;                    /*expanded cursor data*/
  367.  short crsrXValid;                    /*depth of expanded data (0 if none)*/
  368.  Handle crsrXHandle;                /*future use*/
  369.  Bits16 crsr1Data;                    /*one-bit cursor*/
  370.  Bits16 crsrMask;                    /*cursor's mask*/
  371.  Point crsrHotSpot;                    /*cursor's hotspot*/
  372.  long crsrXTable;                    /*private*/
  373.  long crsrID;                        /*private*/
  374. };
  375.  
  376. typedef struct CCrsr CCrsr;
  377. typedef CCrsr *CCrsrPtr, **CCrsrHandle;
  378.  
  379. struct CIcon {
  380.  PixMap iconPMap;                    /*the icon's pixMap*/
  381.  BitMap iconMask;                    /*the icon's mask*/
  382.  BitMap iconBMap;                    /*the icon's bitMap*/
  383.  Handle iconData;                    /*the icon's data*/
  384.  short iconMaskData[1];                /*icon's mask and BitMap data*/
  385. };
  386.  
  387. typedef struct CIcon CIcon;
  388. typedef CIcon *CIconPtr, **CIconHandle;
  389.  
  390. struct GammaTbl {
  391.  short gVersion;                    /*gamma version number*/
  392.  short gType;                        /*gamma data type*/
  393.  short gFormulaSize;                /*Formula data size*/
  394.  short gChanCnt;                    /*number of channels of data*/
  395.  short gDataCnt;                    /*number of values/channel*/
  396.  short gDataWidth;                    /*bits/corrected value (data packed to next larger byte size)*/
  397.  short gFormulaData[1];                /*data for formulas followed by gamma values*/
  398. };
  399.  
  400. typedef struct GammaTbl GammaTbl;
  401. typedef GammaTbl *GammaTblPtr, **GammaTblHandle;
  402.  
  403. struct ITab {
  404.  long iTabSeed;                        /*copy of CTSeed from source CTable*/
  405.  short iTabRes;                        /*bits/channel resolution of iTable*/
  406.  unsigned char iTTable[1];            /*byte colortable index values*/
  407. };
  408.  
  409. typedef struct ITab ITab;
  410. typedef ITab *ITabPtr, **ITabHandle;
  411.  
  412. struct SProcRec {
  413.  Handle nxtSrch;                    /*SProcHndl Handle to next SProcRec*/
  414.  ColorSearchProcPtr srchProc;        /*pointer to search procedure*/
  415. };
  416.  
  417. typedef struct SProcRec SProcRec;
  418. typedef SProcRec *SProcPtr, **SProcHndl;
  419.  
  420. struct CProcRec {
  421.  Handle nxtComp;                    /*CProcHndl Handle to next CProcRec*/
  422.  ColorComplementProcPtr compProc;    /*pointer to complement procedure*/
  423. };
  424.  
  425. typedef struct CProcRec CProcRec;
  426. typedef CProcRec *CProcPtr, **CProcHndl;
  427.  
  428. struct GDevice {
  429.  short gdRefNum;                    /*driver's unit number*/
  430.  short gdID;                        /*client ID for search procs*/
  431.  short gdType;                        /*fixed/CLUT/direct*/
  432.  ITabHandle gdITable;                /*Handle to inverse lookup table*/
  433.  short gdResPref;                    /*preferred resolution of GDITable*/
  434.  SProcHndl gdSearchProc;            /*search proc list head*/
  435.  CProcHndl gdCompProc;                /*complement proc list*/
  436.  short gdFlags;                        /*grafDevice flags word*/
  437.  PixMapHandle gdPMap;                /*describing pixMap*/
  438.  long gdRefCon;                        /*reference value*/
  439.  Handle gdNextGD;                    /*GDHandle Handle of next gDevice*/
  440.  Rect gdRect;                        /* device's bounds in global coordinates*/
  441.  long gdMode;                        /*device's current mode*/
  442.  short gdCCBytes;                    /*depth of expanded cursor data*/
  443.  short gdCCDepth;                    /*depth of expanded cursor data*/
  444.  Handle gdCCXData;                    /*Handle to cursor's expanded data*/
  445.  Handle gdCCXMask;                    /*Handle to cursor's expanded mask*/
  446.  long gdReserved;                    /*future use. MUST BE 0*/
  447. };
  448.  
  449. typedef struct GDevice GDevice;
  450. typedef GDevice *GDPtr, **GDHandle;
  451.  
  452. struct GrafVars {
  453.  RGBColor rgbOpColor;                /*color for addPin  subPin and average*/
  454.  RGBColor rgbHiliteColor;            /*color for hiliting*/
  455.  Handle pmFgColor;                    /*palette Handle for foreground color*/
  456.  short pmFgIndex;                    /*index value for foreground*/
  457.  Handle pmBkColor;                    /*palette Handle for background color*/
  458.  short pmBkIndex;                    /*index value for background*/
  459.  short pmFlags;                        /*flags for Palette Manager*/
  460. };
  461.  
  462. typedef struct GrafVars GrafVars;
  463. typedef GrafVars *GVarPtr, **GVarHandle;
  464.  
  465. struct CQDProcs {
  466.  Ptr textProc;
  467.  Ptr lineProc;
  468.  Ptr rectProc;
  469.  Ptr rRectProc;
  470.  Ptr ovalProc;
  471.  Ptr arcProc;
  472.  Ptr polyProc;
  473.  Ptr rgnProc;
  474.  Ptr bitsProc;
  475.  Ptr commentProc;
  476.  Ptr txMeasProc;
  477.  Ptr getPicProc;
  478.  Ptr putPicProc;
  479.  Ptr opcodeProc;                    /*fields added to QDProcs*/
  480.  Ptr newProc1;
  481.  Ptr newProc2;
  482.  Ptr newProc3;
  483.  Ptr newProc4;
  484.  Ptr newProc5;
  485.  Ptr newProc6;
  486. };
  487.  
  488. typedef struct CQDProcs CQDProcs;
  489. typedef CQDProcs *CQDProcsPtr;
  490.  
  491. struct CGrafPort {
  492.  short device;
  493.  PixMapHandle portPixMap;            /*port's pixel map*/
  494.  short portVersion;                    /*high 2 bits always set*/
  495.  Handle grafVars;                    /*Handle to more fields*/
  496.  short chExtra;                        /*character extra*/
  497.  short pnLocHFrac;                    /*pen fraction*/
  498.  Rect portRect;
  499.  RgnHandle visRgn;
  500.  RgnHandle clipRgn;
  501.  PixPatHandle bkPixPat;                /*background pattern*/
  502.  RGBColor rgbFgColor;                /*RGB components of fg*/
  503.  RGBColor rgbBkColor;                /*RGB components of bk*/
  504.  Point pnLoc;
  505.  Point pnSize;
  506.  short pnMode;
  507.  PixPatHandle pnPixPat;                /*pen's pattern*/
  508.  PixPatHandle fillPixPat;            /*fill pattern*/
  509.  short pnVis;
  510.  short txFont;
  511.  Style txFace;                        /*txFace is unpacked byte  push as short*/
  512.  char filler;
  513.  short txMode;
  514.  short txSize;
  515.  Fixed spExtra;
  516.  long fgColor;
  517.  long bkColor;
  518.  short colrBit;
  519.  short patStretch;
  520.  Handle picSave;
  521.  Handle rgnSave;
  522.  Handle polySave;
  523.  CQDProcsPtr grafProcs;
  524. };
  525.  
  526. typedef struct CGrafPort CGrafPort;
  527. typedef CGrafPort *CGrafPtr;
  528.  
  529.  
  530. typedef CGrafPtr CWindowPtr;
  531.  
  532. struct ReqListRec {
  533.  short reqLSize;                    /*request list size*/
  534.  short reqLData[1];                    /*request list data*/
  535. };
  536.  
  537. typedef struct ReqListRec ReqListRec;
  538.  
  539. struct OpenCPicParams {
  540.  Rect srcRect;
  541.  Fixed hRes;
  542.  Fixed vRes;
  543.  short version;
  544.  short reserved1;
  545.  long reserved2;
  546. };
  547.  
  548. typedef struct OpenCPicParams OpenCPicParams;
  549.  
  550.  
  551. typedef pascal void (*DeviceLoopDrawingProcPtr)(short depth, short deviceFlags, GDHandle targetDevice,  long userData);
  552.  
  553. extern struct  {
  554. char privates[76];
  555. long randSeed;
  556. BitMap screenBits;
  557. Cursor arrow;
  558. Pattern dkGray;
  559. Pattern ltGray;
  560. Pattern gray;
  561. Pattern black;
  562. Pattern white;
  563. GrafPtr thePort;
  564. }qd;
  565.  
  566.  
  567. #ifdef __cplusplus
  568. extern "C" {
  569. #endif
  570. pascal void InitGraf(void *globalPtr)
  571.  = 0xA86E; 
  572. pascal void OpenPort(GrafPtr port)
  573.  = 0xA86F; 
  574. pascal void InitPort(GrafPtr port)
  575.  = 0xA86D; 
  576. pascal void ClosePort(GrafPtr port)
  577.  = 0xA87D; 
  578. pascal void SetPort(GrafPtr port)
  579.  = 0xA873; 
  580. pascal void GetPort(GrafPtr *port)
  581.  = 0xA874; 
  582. pascal void GrafDevice(short device)
  583.  = 0xA872; 
  584. pascal void SetPortBits(const BitMap *bm)
  585.  = 0xA875; 
  586. pascal void PortSize(short width,short height)
  587.  = 0xA876; 
  588. pascal void MovePortTo(short leftGlobal,short topGlobal)
  589.  = 0xA877; 
  590. pascal void SetOrigin(short h,short v)
  591.  = 0xA878; 
  592. pascal void SetClip(RgnHandle rgn)
  593.  = 0xA879; 
  594. pascal void GetClip(RgnHandle rgn)
  595.  = 0xA87A; 
  596. pascal void ClipRect(const Rect *r)
  597.  = 0xA87B; 
  598. pascal void BackPat(ConstPatternParam pat)
  599.  = 0xA87C; 
  600. pascal void InitCursor(void)
  601.  = 0xA850; 
  602. pascal void SetCursor(const Cursor *crsr)
  603.  = 0xA851; 
  604. pascal void HideCursor(void)
  605.  = 0xA852; 
  606. pascal void ShowCursor(void)
  607.  = 0xA853; 
  608. pascal void ObscureCursor(void)
  609.  = 0xA856; 
  610. pascal void HidePen(void)
  611.  = 0xA896; 
  612. pascal void ShowPen(void)
  613.  = 0xA897; 
  614. pascal void GetPen(Point *pt)
  615.  = 0xA89A; 
  616. pascal void GetPenState(PenState *pnState)
  617.  = 0xA898; 
  618. pascal void SetPenState(const PenState *pnState)
  619.  = 0xA899; 
  620. pascal void PenSize(short width,short height)
  621.  = 0xA89B; 
  622. pascal void PenMode(short mode)
  623.  = 0xA89C; 
  624. pascal void PenPat(ConstPatternParam pat)
  625.  = 0xA89D; 
  626. pascal void PenNormal(void)
  627.  = 0xA89E; 
  628. pascal void MoveTo(short h,short v)
  629.  = 0xA893; 
  630. pascal void Move(short dh,short dv)
  631.  = 0xA894; 
  632. pascal void LineTo(short h,short v)
  633.  = 0xA891; 
  634. pascal void Line(short dh,short dv)
  635.  = 0xA892; 
  636. pascal void TextFont(short font)
  637.  = 0xA887; 
  638. pascal void TextFace(short face)
  639.  = 0xA888; 
  640. pascal void TextMode(short mode)
  641.  = 0xA889; 
  642. pascal void TextSize(short size)
  643.  = 0xA88A; 
  644. pascal void SpaceExtra(Fixed extra)
  645.  = 0xA88E; 
  646. pascal void DrawChar(short ch)
  647.  = 0xA883; 
  648. pascal void DrawString(ConstStr255Param s)
  649.  = 0xA884; 
  650. pascal void DrawText(const void *textBuf,short firstByte,short byteCount)
  651.  = 0xA885; 
  652. pascal short CharWidth(short ch)
  653.  = 0xA88D; 
  654. pascal short StringWidth(ConstStr255Param s)
  655.  = 0xA88C; 
  656. pascal short TextWidth(const void *textBuf,short firstByte,short byteCount)
  657.  = 0xA886; 
  658. pascal void MeasureText(short count,const void *textAddr,void *charLocs)
  659.  = 0xA837; 
  660. pascal void GetFontInfo(FontInfo *info)
  661.  = 0xA88B; 
  662. pascal void ForeColor(long color)
  663.  = 0xA862; 
  664. pascal void BackColor(long color)
  665.  = 0xA863; 
  666. pascal void ColorBit(short whichBit)
  667.  = 0xA864; 
  668. pascal void SetRect(Rect *r,short left,short top,short right,short bottom)
  669.  = 0xA8A7; 
  670. pascal void OffsetRect(Rect *r,short dh,short dv)
  671.  = 0xA8A8; 
  672. pascal void InsetRect(Rect *r,short dh,short dv)
  673.  = 0xA8A9; 
  674. pascal Boolean SectRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  675.  = 0xA8AA; 
  676. pascal void UnionRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  677.  = 0xA8AB; 
  678. pascal Boolean EqualRect(const Rect *rect1,const Rect *rect2)
  679.  = 0xA8A6; 
  680. pascal Boolean EmptyRect(const Rect *r)
  681.  = 0xA8AE; 
  682. pascal void FrameRect(const Rect *r)
  683.  = 0xA8A1; 
  684. pascal void PaintRect(const Rect *r)
  685.  = 0xA8A2; 
  686. pascal void EraseRect(const Rect *r)
  687.  = 0xA8A3; 
  688. pascal void InvertRect(const Rect *r)
  689.  = 0xA8A4; 
  690. pascal void FillRect(const Rect *r,ConstPatternParam pat)
  691.  = 0xA8A5; 
  692. pascal void FrameOval(const Rect *r)
  693.  = 0xA8B7; 
  694. pascal void PaintOval(const Rect *r)
  695.  = 0xA8B8; 
  696. pascal void EraseOval(const Rect *r)
  697.  = 0xA8B9; 
  698. pascal void InvertOval(const Rect *r)
  699.  = 0xA8BA; 
  700. pascal void FillOval(const Rect *r,ConstPatternParam pat)
  701.  = 0xA8BB; 
  702. pascal void FrameRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  703.  = 0xA8B0; 
  704. pascal void PaintRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  705.  = 0xA8B1; 
  706. pascal void EraseRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  707.  = 0xA8B2; 
  708. pascal void InvertRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  709.  = 0xA8B3; 
  710. pascal void FillRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  711.  ConstPatternParam pat)
  712.  = 0xA8B4; 
  713. pascal void FrameArc(const Rect *r,short startAngle,short arcAngle)
  714.  = 0xA8BE; 
  715. pascal void PaintArc(const Rect *r,short startAngle,short arcAngle)
  716.  = 0xA8BF; 
  717. pascal void EraseArc(const Rect *r,short startAngle,short arcAngle)
  718.  = 0xA8C0; 
  719. pascal void InvertArc(const Rect *r,short startAngle,short arcAngle)
  720.  = 0xA8C1; 
  721. pascal void FillArc(const Rect *r,short startAngle,short arcAngle,ConstPatternParam pat)
  722.  = 0xA8C2; 
  723. pascal RgnHandle NewRgn(void)
  724.  = 0xA8D8; 
  725. pascal void OpenRgn(void)
  726.  = 0xA8DA; 
  727. pascal void CloseRgn(RgnHandle dstRgn)
  728.  = 0xA8DB; 
  729. pascal OSErr BitMapToRegionGlue(RgnHandle region,const BitMap *bMap); 
  730. pascal OSErr BitMapToRegion(RgnHandle region,const BitMap *bMap)
  731.  = 0xA8D7; 
  732. pascal void DisposeRgn(RgnHandle rgn)
  733.  = 0xA8D9; 
  734. pascal void CopyRgn(RgnHandle srcRgn,RgnHandle dstRgn)
  735.  = 0xA8DC; 
  736. pascal void SetEmptyRgn(RgnHandle rgn)
  737.  = 0xA8DD; 
  738. pascal void SetRectRgn(RgnHandle rgn,short left,short top,short right,short bottom)
  739.  = 0xA8DE; 
  740. pascal void RectRgn(RgnHandle rgn,const Rect *r)
  741.  = 0xA8DF; 
  742. pascal void OffsetRgn(RgnHandle rgn,short dh,short dv)
  743.  = 0xA8E0; 
  744. pascal void InsetRgn(RgnHandle rgn,short dh,short dv)
  745.  = 0xA8E1; 
  746. pascal void SectRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  747.  = 0xA8E4; 
  748. pascal void UnionRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  749.  = 0xA8E5; 
  750. pascal void DiffRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  751.  = 0xA8E6; 
  752. pascal void XorRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  753.  = 0xA8E7; 
  754. pascal Boolean RectInRgn(const Rect *r,RgnHandle rgn)
  755.  = 0xA8E9; 
  756. pascal Boolean EqualRgn(RgnHandle rgnA,RgnHandle rgnB)
  757.  = 0xA8E3; 
  758. pascal Boolean EmptyRgn(RgnHandle rgn)
  759.  = 0xA8E2; 
  760. pascal void FrameRgn(RgnHandle rgn)
  761.  = 0xA8D2; 
  762. pascal void PaintRgn(RgnHandle rgn)
  763.  = 0xA8D3; 
  764. pascal void EraseRgn(RgnHandle rgn)
  765.  = 0xA8D4; 
  766. pascal void InvertRgn(RgnHandle rgn)
  767.  = 0xA8D5; 
  768. pascal void FillRgn(RgnHandle rgn,ConstPatternParam pat)
  769.  = 0xA8D6; 
  770. pascal void ScrollRect(const Rect *r,short dh,short dv,RgnHandle updateRgn)
  771.  = 0xA8EF; 
  772. pascal void CopyBits(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  773.  const Rect *dstRect,short mode,RgnHandle maskRgn)
  774.  = 0xA8EC; 
  775. pascal void SeedFill(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  776.  short height,short words,short seedH,short seedV)
  777.  = 0xA839; 
  778. pascal void CalcMask(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  779.  short height,short words)
  780.  = 0xA838; 
  781. pascal void CopyMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  782.  const Rect *srcRect,const Rect *maskRect,const Rect *dstRect)
  783.  = 0xA817; 
  784. pascal PicHandle OpenPicture(const Rect *picFrame)
  785.  = 0xA8F3; 
  786. pascal void PicComment(short kind,short dataSize,Handle dataHandle)
  787.  = 0xA8F2; 
  788. pascal void ClosePicture(void)
  789.  = 0xA8F4; 
  790. pascal void DrawPicture(PicHandle myPicture,const Rect *dstRect)
  791.  = 0xA8F6; 
  792. pascal void KillPicture(PicHandle myPicture)
  793.  = 0xA8F5; 
  794. pascal PolyHandle OpenPoly(void)
  795.  = 0xA8CB; 
  796. pascal void ClosePoly(void)
  797.  = 0xA8CC; 
  798. pascal void KillPoly(PolyHandle poly)
  799.  = 0xA8CD; 
  800. pascal void OffsetPoly(PolyHandle poly,short dh,short dv)
  801.  = 0xA8CE; 
  802. pascal void FramePoly(PolyHandle poly)
  803.  = 0xA8C6; 
  804. pascal void PaintPoly(PolyHandle poly)
  805.  = 0xA8C7; 
  806. pascal void ErasePoly(PolyHandle poly)
  807.  = 0xA8C8; 
  808. pascal void InvertPoly(PolyHandle poly)
  809.  = 0xA8C9; 
  810. pascal void FillPoly(PolyHandle poly,ConstPatternParam pat)
  811.  = 0xA8CA; 
  812. pascal void SetPt(Point *pt,short h,short v)
  813.  = 0xA880; 
  814. pascal void LocalToGlobal(Point *pt)
  815.  = 0xA870; 
  816. pascal void GlobalToLocal(Point *pt)
  817.  = 0xA871; 
  818. pascal short Random(void)
  819.  = 0xA861; 
  820. pascal void StuffHex(void *thingPtr,ConstStr255Param s)
  821.  = 0xA866; 
  822. pascal Boolean GetPixel(short h,short v)
  823.  = 0xA865; 
  824. pascal void ScalePt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  825.  = 0xA8F8; 
  826. pascal void MapPt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  827.  = 0xA8F9; 
  828. pascal void MapRect(Rect *r,const Rect *srcRect,const Rect *dstRect)
  829.  = 0xA8FA; 
  830. pascal void MapRgn(RgnHandle rgn,const Rect *srcRect,const Rect *dstRect)
  831.  = 0xA8FB; 
  832. pascal void MapPoly(PolyHandle poly,const Rect *srcRect,const Rect *dstRect)
  833.  = 0xA8FC; 
  834. pascal void SetStdProcs(QDProcs *procs)
  835.  = 0xA8EA; 
  836. pascal void StdRect(GrafVerb verb,const Rect *r)
  837.  = 0xA8A0; 
  838. pascal void StdRRect(GrafVerb verb,const Rect *r,short ovalWidth,short ovalHeight)
  839.  = 0xA8AF; 
  840. pascal void StdOval(GrafVerb verb,const Rect *r)
  841.  = 0xA8B6; 
  842. pascal void StdArc(GrafVerb verb,const Rect *r,short startAngle,short arcAngle)
  843.  = 0xA8BD; 
  844. pascal void StdPoly(GrafVerb verb,PolyHandle poly)
  845.  = 0xA8C5; 
  846. pascal void StdRgn(GrafVerb verb,RgnHandle rgn)
  847.  = 0xA8D1; 
  848. pascal void StdBits(const BitMap *srcBits,const Rect *srcRect,const Rect *dstRect,
  849.  short mode,RgnHandle maskRgn)
  850.  = 0xA8EB; 
  851. pascal void StdComment(short kind,short dataSize,Handle dataHandle)
  852.  = 0xA8F1; 
  853. pascal short StdTxMeas(short byteCount,const void *textAddr,Point *numer,
  854.  Point *denom,FontInfo *info)
  855.  = 0xA8ED; 
  856. pascal void StdGetPic(void *dataPtr,short byteCount)
  857.  = 0xA8EE; 
  858. pascal void StdPutPic(const void *dataPtr,short byteCount)
  859.  = 0xA8F0; 
  860. pascal void AddPt(Point src,Point *dst)
  861.  = 0xA87E; 
  862. void subpt(Point *src,Point *dst); 
  863. pascal Boolean EqualPt(Point pt1,Point pt2)
  864.  = 0xA881; 
  865. pascal Boolean PtInRect(Point pt,const Rect *r)
  866.  = 0xA8AD; 
  867. pascal void Pt2Rect(Point pt1,Point pt2,Rect *dstRect)
  868.  = 0xA8AC; 
  869. pascal void PtToAngle(const Rect *r,Point pt,short *angle)
  870.  = 0xA8C3; 
  871. pascal Boolean PtInRgn(Point pt,RgnHandle rgn)
  872.  = 0xA8E8; 
  873. pascal void StdText(short count,const void *textAddr,Point numer,Point denom)
  874.  = 0xA882; 
  875. pascal void StdLine(Point newPt)
  876.  = 0xA890; 
  877. pascal void OpenCPort(CGrafPtr port)
  878.  = 0xAA00; 
  879. pascal void InitCPort(CGrafPtr port)
  880.  = 0xAA01; 
  881. pascal void CloseCPort(CGrafPtr port)
  882.  = 0xA87D; 
  883. pascal PixMapHandle NewPixMap(void)
  884.  = 0xAA03; 
  885. pascal void DisposPixMap(PixMapHandle pm)
  886.  = 0xAA04; 
  887. pascal void DisposePixMap(PixMapHandle pm)
  888.  = 0xAA04; 
  889. pascal void CopyPixMap(PixMapHandle srcPM,PixMapHandle dstPM)
  890.  = 0xAA05; 
  891. pascal PixPatHandle NewPixPat(void)
  892.  = 0xAA07; 
  893. pascal void DisposPixPat(PixPatHandle pp)
  894.  = 0xAA08; 
  895. pascal void DisposePixPat(PixPatHandle pp)
  896.  = 0xAA08; 
  897. pascal void CopyPixPat(PixPatHandle srcPP,PixPatHandle dstPP)
  898.  = 0xAA09; 
  899. pascal void PenPixPat(PixPatHandle pp)
  900.  = 0xAA0A; 
  901. pascal void BackPixPat(PixPatHandle pp)
  902.  = 0xAA0B; 
  903. pascal PixPatHandle GetPixPat(short patID)
  904.  = 0xAA0C; 
  905. pascal void MakeRGBPat(PixPatHandle pp,const RGBColor *myColor)
  906.  = 0xAA0D; 
  907. pascal void FillCRect(const Rect *r,PixPatHandle pp)
  908.  = 0xAA0E; 
  909. pascal void FillCOval(const Rect *r,PixPatHandle pp)
  910.  = 0xAA0F; 
  911. pascal void FillCRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  912.  PixPatHandle pp)
  913.  = 0xAA10; 
  914. pascal void FillCArc(const Rect *r,short startAngle,short arcAngle,PixPatHandle pp)
  915.  = 0xAA11; 
  916. pascal void FillCRgn(RgnHandle rgn,PixPatHandle pp)
  917.  = 0xAA12; 
  918. pascal void FillCPoly(PolyHandle poly,PixPatHandle pp)
  919.  = 0xAA13; 
  920. pascal void RGBForeColor(const RGBColor *color)
  921.  = 0xAA14; 
  922. pascal void RGBBackColor(const RGBColor *color)
  923.  = 0xAA15; 
  924. pascal void SetCPixel(short h,short v,const RGBColor *cPix)
  925.  = 0xAA16; 
  926. pascal void SetPortPix(PixMapHandle pm)
  927.  = 0xAA06; 
  928. pascal void GetCPixel(short h,short v,RGBColor *cPix)
  929.  = 0xAA17; 
  930. pascal void GetForeColor(RGBColor *color)
  931.  = 0xAA19; 
  932. pascal void GetBackColor(RGBColor *color)
  933.  = 0xAA1A; 
  934. pascal void SeedCFill(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  935.  const Rect *dstRect,short seedH,short seedV,ColorSearchProcPtr matchProc,
  936.  long matchData)
  937.  = 0xAA50; 
  938. pascal void CalcCMask(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  939.  const Rect *dstRect,const RGBColor *seedRGB,ColorSearchProcPtr matchProc,
  940.  long matchData)
  941.  = 0xAA4F; 
  942. pascal PicHandle OpenCPicture(const OpenCPicParams *newHeader)
  943.  = 0xAA20; 
  944. pascal void OpColor(const RGBColor *color)
  945.  = 0xAA21; 
  946. pascal void HiliteColor(const RGBColor *color)
  947.  = 0xAA22; 
  948. pascal void DisposCTable(CTabHandle cTable)
  949.  = 0xAA24; 
  950. pascal void DisposeCTable(CTabHandle cTable)
  951.  = 0xAA24; 
  952. pascal CTabHandle GetCTable(short ctID)
  953.  = 0xAA18; 
  954. pascal CCrsrHandle GetCCursor(short crsrID)
  955.  = 0xAA1B; 
  956. pascal void SetCCursor(CCrsrHandle cCrsr)
  957.  = 0xAA1C; 
  958. pascal void AllocCursor(void)
  959.  = 0xAA1D; 
  960. pascal void DisposCCursor(CCrsrHandle cCrsr)
  961.  = 0xAA26; 
  962. pascal void DisposeCCursor(CCrsrHandle cCrsr)
  963.  = 0xAA26; 
  964. pascal CIconHandle GetCIcon(short iconID)
  965.  = 0xAA1E; 
  966. pascal void PlotCIcon(const Rect *theRect,CIconHandle theIcon)
  967.  = 0xAA1F; 
  968. pascal void DisposCIcon(CIconHandle theIcon)
  969.  = 0xAA25; 
  970. pascal void DisposeCIcon(CIconHandle theIcon)
  971.  = 0xAA25; 
  972. pascal void SetStdCProcs(CQDProcs *procs)
  973.  = 0xAA4E; 
  974. pascal void CharExtra(Fixed extra)
  975.  = 0xAA23; 
  976. pascal GDHandle GetMaxDevice(const Rect *globalRect)
  977.  = 0xAA27; 
  978. pascal long GetCTSeed(void)
  979.  = 0xAA28; 
  980. pascal GDHandle GetDeviceList(void)
  981.  = 0xAA29; 
  982. pascal GDHandle GetMainDevice(void)
  983.  = 0xAA2A; 
  984. pascal GDHandle GetNextDevice(GDHandle curDevice)
  985.  = 0xAA2B; 
  986. pascal Boolean TestDeviceAttribute(GDHandle gdh,short attribute)
  987.  = 0xAA2C; 
  988. pascal void SetDeviceAttribute(GDHandle gdh,short attribute,Boolean value)
  989.  = 0xAA2D; 
  990. pascal void InitGDevice(short qdRefNum,long mode,GDHandle gdh)
  991.  = 0xAA2E; 
  992. pascal GDHandle NewGDevice(short refNum,long mode)
  993.  = 0xAA2F; 
  994. pascal void DisposGDevice(GDHandle gdh)
  995.  = 0xAA30; 
  996. pascal void DisposeGDevice(GDHandle gdh)
  997.  = 0xAA30; 
  998. pascal void SetGDevice(GDHandle gd)
  999.  = 0xAA31; 
  1000. pascal GDHandle GetGDevice(void)
  1001.  = 0xAA32; 
  1002. pascal long Color2Index(const RGBColor *myColor)
  1003.  = 0xAA33; 
  1004. pascal void Index2Color(long index,RGBColor *aColor)
  1005.  = 0xAA34; 
  1006. pascal void InvertColor(RGBColor *myColor)
  1007.  = 0xAA35; 
  1008. pascal Boolean RealColor(const RGBColor *color)
  1009.  = 0xAA36; 
  1010. pascal void GetSubTable(CTabHandle myColors,short iTabRes,CTabHandle targetTbl)
  1011.  = 0xAA37; 
  1012. pascal void MakeITable(CTabHandle cTabH,ITabHandle iTabH,short res)
  1013.  = 0xAA39; 
  1014. pascal void AddSearch(ColorSearchProcPtr searchProc)
  1015.  = 0xAA3A; 
  1016. pascal void AddComp(ColorComplementProcPtr compProc)
  1017.  = 0xAA3B; 
  1018. pascal void DelSearch(ColorSearchProcPtr searchProc)
  1019.  = 0xAA4C; 
  1020. pascal void DelComp(ColorComplementProcPtr compProc)
  1021.  = 0xAA4D; 
  1022. pascal void SubPt(Point src,Point *dst)
  1023.  = 0xA87F; 
  1024. pascal void SetClientID(short id)
  1025.  = 0xAA3C; 
  1026. pascal void ProtectEntry(short index,Boolean protect)
  1027.  = 0xAA3D; 
  1028. Boolean equalpt(Point *pt1,Point *pt2); 
  1029. pascal void ReserveEntry(short index,Boolean reserve)
  1030.  = 0xAA3E; 
  1031. pascal void SetEntries(short start,short count,CSpecArray aTable)
  1032.  = 0xAA3F; 
  1033. Boolean ptinrect(Point *pt,const Rect *r); 
  1034. pascal void SaveEntries(CTabHandle srcTable,CTabHandle resultTable,ReqListRec *selection)
  1035.  = 0xAA49; 
  1036. pascal void RestoreEntries(CTabHandle srcTable,CTabHandle dstTable,ReqListRec *selection)
  1037.  = 0xAA4A; 
  1038. void pt2rect(Point *pt1,Point *pt2,const Rect *destRect); 
  1039. pascal short QDError(void)
  1040.  = 0xAA40; 
  1041. pascal void CopyDeepMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  1042.  const Rect *srcRect,const Rect *maskRect,const Rect *dstRect,short mode,
  1043.  RgnHandle maskRgn)
  1044.  = 0xAA51; 
  1045. pascal void DeviceLoop(RgnHandle drawingRgn,DeviceLoopDrawingProcPtr drawingProc,
  1046.  long userData,DeviceLoopFlags flags)
  1047.  = 0xABCA; 
  1048. #pragma parameter __A0 GetMaskTable
  1049. pascal Ptr GetMaskTable(void)
  1050.  = 0xA836; 
  1051. void pttoangle(const Rect *r,Point *pt,short *angle); 
  1052. Boolean ptinrgn(Point *pt,RgnHandle rgn); 
  1053. void stdtext(short count,const void *textAddr,Point *numer,Point *denom); 
  1054. void stdline(Point *newPt); 
  1055. void drawstring(char *s); 
  1056. void addpt(Point *src,Point *dst); 
  1057. void stuffhex(Ptr thingPtr,char *s); 
  1058. short stringwidth(char *s); 
  1059.  
  1060.  
  1061. #ifdef __cplusplus
  1062. }
  1063. #endif
  1064.  
  1065. #endif
  1066.